const siteId = 25

function getAdData() {
    var adjs = document.createElement('script')
    adjs.async = 'async'
    adjs.src = 'https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-4973766274671240'
    adjs.crossorigin = 'anonymous'
    adjs.setAttribute("data-ad-frequency-hint", "30s");
    adjs.setAttribute("data-ad-channel", 6264293855);
    // adjs.setAttribute("data-adbreak-test","on");

    document.head.append(adjs)
}

function getAdData() {
    var adJs = document.createElement('script')
    adJs.async = 'async'
    adJs.src = 'https://securepubads.g.doubleclick.net/tag/js/gpt.js'
    document.head.append(adJs)
}

function getQueryVariable(variable) {
    var query = window.location.search.substring(1);
    var vars = query.split("&");
    for (var i = 0; i < vars.length; i++) {
        var pair = vars[i].split("=");
        if (pair[0] == variable) { return pair[1]; }
    }
    return (false);
}

window['addAds'] = function () {
    let childList = document.getElementsByClassName('ad-wrapper');
    for (let i = 0; i < childList.length; i++) {
        let insNode = childList[i].firstChild;
        insNode.style.maxWidth = childList[i].clientWidth || childList[i].offsetWidth;
        (adsbygoogle = window.adsbygoogle || []).push({});
    }
}

function fn() {
    const texts = document.getElementsByClassName('text-xs font-medium text-center mt-2')
    const strs = []
    for (const v of texts) {
        strs.push(v.innerHTML)
    }
    return strs.map(item => {
        return {
            cardName: item,
            url: '../imgs/major/0.webp'
        }
    })
}

function getRandomNumber() {
    return Math.floor(Math.random() * 78);
}

